﻿
namespace Ordering.Domain.Models
{
    public class OrderItem:Entity<OrderItemId>
    {
        public OrderItem(OrderId orderId, ProductId productId,int quantity,decimal price)
        {
            this.Id = OrderItemId.Of(Guid.NewGuid());
            this.OrderId = orderId;
            this.ProductId = productId;
            this.Quantity = quantity;
            this.Price = price;
        }
        public OrderId OrderId { get; set; }
        public ProductId ProductId { get; set; }

        public int Quantity { get; set; }

        public decimal Price { get; set; }
    }
}
